<template>
	<div class="home">
		<div class="home-content">
			<div style='margin-bottom: 15px'>1.菜单与路由分离，菜单由后端返回(前端组件与菜单进行匹配)</div>
			<div>2.由后端返回菜单路由，前端将动态路由转换成视图组件添加到router实例</div>
		</div>
	</div>
</template>

<script>
import { getMenulist } from "../api/user";
export default {
	data() {
		return {};
	},
	created() {
		// this.initialState();
	},
	methods: {
		// 初始化
		async initialState() {
			const res = await getMenulist();
			this.$store.commit("user/SET_MENU", res.data);
		}
	}
};
</script>

<style lang="scss" scoped>

</style>
